import service from '@/utils/request'
export const getAuthorityList = (params) => {
    return service({
        url: '/roles/page',
        method: 'get',
        params
    })
}

// @Summary 删除角色

export const deleteAuthority = (params) => {
    return service({
        url: `/roles/${params}`,
        method: 'delete'
    })
}

// @Summary 创建角色

// @Router /authority/createAuthority [post]
export const createAuthority = (data) => {
    return service({
        url: '/roles/add',
        method: 'post',
        data
    })
}


// @Summary 设置角色资源权限

export const setDataAuthority = (data) => {
    return service({
        url: '/roles/setAuth',
        method: 'post',
        data
    })
}

// @Summary 修改角色

export const updateAuthority = (data) => {
    return service({
        url: '/roles/edit',
        method: 'put',
        data
    })
}
export const employeesList = () => {
    return service({
        url: '/employees/list',
        method: 'get'
    })

}
